function shootFirebal(caster, speed, pDamage, direction,coast)
	

		if (caster.mana - coast >= 0)then
		caster.mana = caster.mana - coast
			physic.addPO( Fireball:new{ 
				owner = caster,
				cost = 0, 
				damage = pDamage,
				movementSpeed = speed,
				direction = direction,
				target = gameelements,
				x = caster.x,
				y = caster.y,
				center ={caster.center[1],caster.center[2]},
				team = caster.team
			})
	end

end


function shootFirebalAllDirections(caster, speed, pDamage)
	for i = 1,8 do  
		physic.addPO( Fireball:new{ 
			owner = caster, 
			damage = pDamage,
			movementSpeed = speed,
			direction = i,
			target = gameelements,
			x = caster.x,
			y = caster.y,
			center ={caster.center[1],caster.center[2]},
			team = caster.team
		})
	end
end

function teleport(caster, amount)
	for i = 1, amount do 
		caster:walk()
	end
end
